package org.dtrd.modules.suggest.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import lombok.Getter;
import lombok.Setter;
import org.dtrd.modules.suggest.entity.bean.DoctorSigninSuggestCategoryDetail;


/**
 * <p>
 * 医生端打卡建议分类表
 * </p>
 *
 * @author sun
 * @since 2022-09-21
 */
@Getter
@Setter
@TableName("dtrd_ent_rd_doctor_signin_suggest_category")
public class DtrdEntRdDoctorSigninSuggestCategory {

    @TableId(value = "data_id", type = IdType.AUTO)
    private Integer dataId;

    /**
     * 分类名称
     */
    @TableField("category_name")
    private String categoryName;

    /**
     * 机构
     */
    @TableField("org_code")
    private String orgCode;

    /**
     * 创建人
     */
    @TableField("create_by")
    private String createBy;

    @TableField("create_time")
    private Date createTime;

    @TableField("is_del")
    @TableLogic
    private Integer isDel;

    public DtrdEntRdDoctorSigninSuggestCategory init() {
        createTime = new Date();
        isDel = 0;
        return this;
    }

    public DtrdEntRdDoctorSigninSuggestCategory parseFromDto(DoctorSigninSuggestCategoryDetail dto) {
        dataId = dto.getDataId();
        categoryName = dto.getCategoryName();
        orgCode = dto.getOrgCode();
        return this;
    }


}
